package org.kevin.controller;

import com.github.pagehelper.PageInfo;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: BaseController
 * @Description: TODO
 * @Author: kevin
 * @Date: 2019/8/26 7:12 下午
 * @Version: 1.0
 */
public class BaseController {

    protected Map<String, Object> getDataTable(PageInfo<?> pageInfo) {
        Map<String, Object> rspData = new HashMap<>();
        rspData.put("rows", pageInfo.getList());
        rspData.put("total", pageInfo.getTotal());
        return rspData;
    }
}
